package cn.fan.maptruct.mmaper;

import cn.fan.maptruct.entiy.BooleanStrFormat;
import cn.fan.maptruct.entiy.Customer;
import cn.fan.maptruct.entiy.CustomerDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper( uses = { BooleanStrFormat.class})
public interface CustomerMapper {  
  
    CustomerMapper INSTANCES = Mappers.getMapper(CustomerMapper.class);
  
    @Mappings({
            @Mapping(source = "name", target = "customerName"),
            @Mapping(source = "isDisable", target = "disable")  
    })
    CustomerDto toCustomerDto(Customer customer);
}  